<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ page isELIgnored="false" %> 

<%String path = request.getContextPath();%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	
	<style rel="stylesheet" type="text/css">
	
    </style>

    <script type="text/javascript">
           function gerenzhuye()
		   {
			    var targetWinUrl="<%=path %>/auser/index.jsp";
				var targetWinName="newWin";
				var features="width="+screen.width+" ,height="+screen.height+" ,toolbar=yes, top=0, left=0, menubar=yes, scrollbars=yes, resizable=yes,location=no, status=yes";
				var new_win=window.open(targetWinUrl,targetWinName,features);
		   }
		   
		    function show111()
			{
			    document.getElementById("tr111").style.display="block";
			}
			function hid111()
			{
			    document.getElementById("tr111").style.display="none";
			}
			
			
			function userLogout()
	        {
                 if(confirm("确定要退出本系统吗??"))
	             {
	                   var s="<%=path %>/userLogout.action";
                       window.location.href=s;
	             }
	        }
			
			function myCart()
	        {
	                 var s="<%=path %>/myCart.action";
	                 window.location.href=s;
	        }
	        
	        
	        function myOrder()
	        {
	                 var s="<%=path %>/myOrder.action";
	                 window.location.href=s;
	        }
	        
	        function div1show()
		   {
		       document.getElementById("div1").style.display="block";//div123在top.jsp里
		   }
    </script>
</head>
  
<body>
        <div class="top">
        	<div class="logo"></div>
            
            <div class="txt01">
                <p style="font-size: 21px;">咖啡网站设计与开发</p>
            </div>
            <div class="tel" style="margin-left: 300px;margin-top: 20px;">
                <c:if test="${sessionScope.userType !=1 }">
                <p><a href="<%=path %>/qiantai/user/userReg.jsp">用户注册</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="<%=path %>/qiantai/user/userLogin.jsp">登陆</a></p>
                </c:if>
                <c:if test="${sessionScope.userType ==1 }">
                <p>
                                                         欢迎您：${sessionScope.user.userRealname }&nbsp;&nbsp;
                   <a href="#" onclick="userLogout()" style="font-size: 15px;font-family: 微软雅黑;">安全退出</a>&nbsp;&nbsp;
                   <a href="#" onclick="myCart()" style="font-size: 15px;font-family: 微软雅黑;">购物车</a>&nbsp;&nbsp;
                   <a href="#" onclick="myOrder()" style="font-size: 15px;font-family: 微软雅黑;">我的订单</a>&nbsp;&nbsp;  
                   <a href="<%=path %>/shouhouMine.action" style="font-size: 15px;font-family: 微软雅黑;">售后信息</a>&nbsp;&nbsp;                                    
                </p>
                </c:if>
            </div>            
        </div> 
        <div class="nav">
        	<div class="nav_bg" style="margin-top: 11px;">
            	<a href="<%=path %>/qiantai/default.jsp" style="margin-left: 50px;font-size: 17px;font-family: 微软雅黑;color: white;">系统首页</a>
            	<a href="#" onclick="div1show()" style="margin-left: 50px;font-size: 17px;font-family: 微软雅黑;color: white;">商品类别</a>
            	<a href="<%=path %>/qiantai/goods/goodsSea.jsp" style="margin-left: 50px;font-size: 17px;font-family: 微软雅黑;color: white;">商品查询</a>
            	<a href="<%=path %>/gonggaoAll.action" style="margin-left: 50px;font-size: 17px;font-family: 微软雅黑;color: white;">系统公告</a>
            	<a href="<%=path %>/liuyanbanAll.action" style="margin-left: 50px;font-size: 17px;font-family: 微软雅黑;color: white;">系统留言板</a>
                <a href="<%=path %>/shipinAll.action" style="margin-left: 50px;font-size: 17px;font-family: 微软雅黑;color: white;">咖啡种类制作教学</a>
            </div>
        </div>
        <div style="margin-left: 300px;"  style="display: none;" id="div1">
		   <div style="margin-top: 5px;">
		          <c:forEach items="${sessionScope.cateLogList}" var="catelog">
					<a href="<%=path %>/goodsByCatelog.action?goodsCatelogId=${catelog.catelogId}" style="color: red;font-family: 微软雅黑;margin-left: 20px;">${catelog.catelogName}</a>
			      </c:forEach>
           </div>
		</div>
</body>
</html>
